<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE HTML>
<html>
  <head>
    <title>My JSP 'goal.jsp' starting page</title>
    <link rel="stylesheet" type="text/css" href="static/bootstrap/css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="static/css/wall.css" />
  </head>
  
  <body class="body">
  	<%@ include file="top.jsp" %>
  	<div class="container" >
  		<div class="row" style="padding-top:60px;">
	  		<jsp:include page="left.jsp">
				<jsp:param value="goal" name="tag"/>
			</jsp:include>
	  		<div class="span9">
	  			<div class="btn-group" style="float:right">
					<ul class="nav nav-pills">
					    <li class="dropdown" id="menu1">
						    <a class="btn dropdown-toggle" data-toggle="dropdown" href="#menu1">
							   <i class="icon-cog"></i>
								操作
							    <b class="caret"></b>
						    </a>
						    <ul class="dropdown-menu">
							    <li>
									<a href="goal.jspx?m=toAdd">
										<i class="icon-plus"></i>
										添加新目标
									</a>
								</li>
								<li>
									<a href="#">
										<i class="icon-zoom-in"></i>
										浏览所有任务
									</a>
								</li>
						    </ul>
					    </li>
				    </ul>
				</div>
				<div class="clear"></div>
				<div style="padding-top:35px">
					<c:forEach items="${requestScope.goalList }" var="goal">
			  			<div  style="padding-top:18px">
			  				<ul class="breadcrumb" style="margin-bottom:0px;border-radius:3px 3px 0px 0px;">
								<li>
									<i class="icon-th"></i>
									<a href="task.jspx?id=${goal.id}" style="color:black">${goal.name }</a>
								</li>
								<li style="float:right">
									<i class="icon-edit"></i>
									<a class="link-black" href="goal.jspx?m=edit&id=${goal.id}" style="color:black">编辑</a>
								</li>
							</ul>
							<div class="wall">
								<p>${goal.describe }</p>
								<c:choose>
									<c:when test="${goal.schedule<30 }">
										<div class="progress progress-danger progress-striped active">
											<div class="bar" style="width: ${goal.schedule}%;">已完成${goal.schedule}%</div>
										</div>
									</c:when>
									<c:when test="${goal.schedule>=30 && goal.schedule<60 }">
										<div class="progress progress-warning progress-striped active">
											<div class="bar" style="width: ${goal.schedule}%;">已完成${goal.schedule}%</div>
										</div>
									</c:when>
									<c:when test="${goal.schedule>=60 && goal.schedule<100 }">
										<div class="progress progress-info progress-striped active">
											<div class="bar" style="width: ${goal.schedule}%;">已完成${goal.schedule}%</div>
										</div>
									</c:when>
									<c:when test="${goal.schedule==100 }">
										<div class="progress progress-success progress-striped active">
											<div class="bar" style="width: ${goal.schedule}%;">已完成${goal.schedule}%</div>
										</div>
									</c:when>
								</c:choose>
								
								
							</div>
			  			</div>
					</c:forEach>
				</div>
			</div>
	  	</div>
  	</div>
  	 <script type="text/javascript" src="static/jquery/jquery.js"></script>
  	 <script type="text/javascript" src="static/bootstrap/js/bootstrap.min.js"></script>
  </body>
</html>
